source ~/.bashrc
dir=/home/work_nfs15/xlgeng/new_workspace/wenet_gxl_salmonn/examples/aishell/salmonn/exp/salmonn_v14/1_epoch
mkdir -p $dir
train_config=conf/train_salmonn_v15.yaml
test_data_dir="/home/work_nfs15/xlgeng/data/scp_test"

pt_name="step_15708"
scene_name="speechio"



decode_checkpoint=$dir/"${pt_name}".pt
stage=5
stop_stage=5


echo "final checkpoint is $decode_checkpoint"


full_speechio="speechio_0 speechio_1 speechio_2 speechio_3 speechio_4 speechio_5 speechio_6 speechio_7 speechio_8 speechio_9 speechio_10 speechio_11 speechio_12 speechio_13 speechio_14 speechio_15 speechio_16 speechio_17 speechio_18 speechio_19 speechio_20 speechio_21 speechio_22 speechio_23 speechio_24 speechio_25 speechio_26"
half_1="speechio_0 speechio_1 speechio_2 speechio_3 speechio_4 speechio_5 speechio_6 speechio_7 speechio_8 speechio_9 speechio_10 speechio_11 speechio_12 speechio_13"
half_2="speechio_14 speechio_15 speechio_16 speechio_17 speechio_18 speechio_19 speechio_20 speechio_21 speechio_22 speechio_23 speechio_24 speechio_24 speechio_25 speechio_26"

eight_0="speechio_0 speechio_1 speechio_2 speechio_24"
eight_1="speechio_3 speechio_4 speechio_5 speechio_25"
eight_2="speechio_6 speechio_7 speechio_8 speechio_26"
eight_3="speechio_9 speechio_10 speechio_11"
eight_4="speechio_12 speechio_13 speechio_14"
eight_5="speechio_15 speechio_16 speechio_17"
eight_6="speechio_18 speechio_19 speechio_20"
eight_7="speechio_21 speechio_22 speechio_23"




for i in {0..0}; do
    echo "i = $i"
    gpu_id=$i
#    eval "test_sets=\${eight_${i}}"
#    echo "test_sets = $test_sets"
    test_sets=$full_speechio
    prompt_type="common_prompt"
    res_path=$pt_name/$scene_name/$prompt_type
    echo $res_path
    log_path=$(echo $res_path | sed 's#/#_#g')_$gpu_id
    test_sets=$(echo "$test_sets" | sed 's/ /--/g') # 为了传输给recognize.sh
    my_named_nohup "${log_path}" ./recognize.sh --gpu_id $gpu_id --dir $dir --train_config "$train_config" --decode_checkpoint "$decode_checkpoint" --decode_checkpoint_name "$res_path" --stage $stage --stop_stage $stop_stage --test_data_dir "$test_data_dir"  --test_sets "$test_sets" --key $prompt_type
done


echo "finish!"